<?php
/**
 * Created by PhpStorm.
 * User: yxs
 * Date: 2017/4/18
 * Time: 10:56
 */

namespace model;


use think\Db;
use think\Model;

class ShopStore extends BaseModel
{
    protected $insert = ["add_time"];
    public function setAddTimeAttr(){
        return time();
    }

    public function getCoverImageAttr($value){
        return '/public/admin/static/upload/'.Db::name('file')->where(['id'=>$value])->value('filename');
    }

    public function getLogoAttr($value){
        return '/public/admin/static/upload/'.Db::name('file')->where(['id'=>$value])->value('filename');
    }
}